<template>
  <h1 :class="animateClass" @click="rotate">软件工程系 is NO.1</h1>
</template>

<script setup>
  import {ref} from 'vue'
  const animateClass = ref('')
  const rotate = () => {
    animateClass.value = 'animate__animated animate__rubberBand' // animate__rubberBand是控制什么动画的 animate__animated是固定的 
    console.log('rotate')
    setTimeout(() => {
      animateClass.value = ''
    }, 1000);
  }
  // const animateClass = 'animate__animated animate__rotateIn'
</script>

<style>

</style>